package server;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;

public class StreetsNameHelper {
	public static String getTextDateByUrl(String urlInString) throws UnsupportedEncodingException, IOException{
		URL url = new URL (urlInString);
		//System.out.println("insde street helper with: "+urlInString);
		InputStreamReader isr = new InputStreamReader(url.openStream(), "UTF-8");
		BufferedReader in = new BufferedReader(isr);  
		String text="";
		String inputLine;  
		while ((inputLine = in.readLine()) != null) {  
			text+=inputLine + "\n";  
		}
		return text;
	}

}
